<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改隐患处理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-hiddenRepair-edit" th:object="${hiddenRepair}">
            <input name="repairId" th:field="*{repairId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">对应上报单号：</label>
                <div class="col-sm-8">
                    <input name="orderId" th:field="*{orderEntity.orderNum}" class="form-control" type="text" required disabled>
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.alterDate}">
                <label class="col-sm-3 control-label">要求处理日期：</label>
                <div class="col-sm-8">
                    <input name="alterDate" th:value="${#dates.format(hiddenRepair.alterDate, 'yyyy-MM-dd')}" class="form-control" type="text" >
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.finishImgs}">
                <label class="col-sm-3 control-label">处理完成图片：</label>
                <div class="col-sm-8">
                    <img class="pimg" th:each="item,index : ${#strings.arraySplit(hiddenRepair.finishImgs,'|')}" th:src="${'../../../'+ item}" height=50px width=60px />
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.finishDesc}" >
                <label class="col-sm-3 control-label is-required">处理完成说明：</label>
                <div class="col-sm-8">
                    <textarea class="form-control" name="finishDesc" readonly>[[*{finishDesc}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">处理人：</label>
                <div class="col-sm-8">
                    <input name="processorName" th:field="*{processorName}" class="form-control" type="text" required disabled>
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.submitTime}">
                <label class="col-sm-3 control-label">处理时间：</label>
                <div class="col-sm-8">
                    <input name="submitTime" th:value="${#dates.format(hiddenRepair.submitTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.checkerName}">
                <label class="col-sm-3 control-label">验收人：</label>
                <div class="col-sm-8">
                    <input name="checkerName" th:field="*{checkerName}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.acceptDate}">
                <label class="col-sm-3 control-label">要求验收日期：</label>
                <div class="col-sm-8">
                    <input name="acceptDate" th:value="${#dates.format(hiddenRepair.acceptDate, 'yyyy-MM-dd')}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${not #strings.isEmpty(hiddenRepair.checkImgs)}">
                <label class="col-sm-3 control-label">验收完成图片：</label>
                <div class="col-sm-8">
                    <img class="pimg" th:each="item,index : ${#strings.arraySplit(hiddenRepair.checkImgs,'|')}" th:src="${'../../../'+ item}" height=50px width=60px />
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.remark}">
                <label class="col-sm-3 control-label">验收说明：</label>
                <div class="col-sm-8">
                    <textarea class="form-control" name="finishDesc" readonly>[[*{remark}]]</textarea>
                </div>
            </div>
            <div class="form-group" th:if="${hiddenRepair.checkTime}" readonly>
                <label class="col-sm-3 control-label">验收时间：</label>
                <div class="col-sm-8">
                    <input name="checkTime" th:value="${#dates.format(hiddenRepair.checkTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" disabled>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "hidden/hiddenRepair";
        $("#form-hiddenRepair-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {

            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-hiddenRepair-edit').serialize());
            }
        }

        $("input[name='alterDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='acceptDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>